package com.ruoyi.back.controller

import com.ruoyi.app.common.Data
import com.ruoyi.back.domain.ImageTextShare
import com.ruoyi.back.service.ImageTextShareService
import io.swagger.annotations.Api
import io.swagger.annotations.ApiOperation
import org.springframework.beans.factory.annotation.Autowired
import org.springframework.web.bind.annotation.PostMapping
import org.springframework.web.bind.annotation.RequestBody
import org.springframework.web.bind.annotation.RequestMapping
import org.springframework.web.bind.annotation.RestController

@RestController
@RequestMapping("system/imageTextShare")
@Api(tags = ["文案链接分享api"])
class ImageTextShareController {

    @Autowired
    private lateinit var imageTextShareService: ImageTextShareService


    @ApiOperation("保存文案链接分享")
    @PostMapping("save")
    fun saveImageTextShare(@RequestBody imageTextShare: ImageTextShare): Data<Boolean> = imageTextShareService.saveImageTextShare(imageTextShare)

    @ApiOperation("获取文案链接分享")
    @PostMapping("get")
    fun getUrlShare(): Data<ImageTextShare> = imageTextShareService.getImageTextShare()
}